package Application.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import Application.entity.Teacher;

public interface TeacherDao {

	@Insert("insert into teacher (name,password,institue,school)value(#{name},#{password},#{institue},#{school})")
	@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
	public void insertTeacher(Teacher teacher);
	
	@Select("select * from teacher  where id=#{id}")
	public Teacher findTeacherById(int id);
	
	@Select("select * from teacher")
	public List<Teacher> findTeacherList();
}
